From 121aa43177f3d2c31603bca89934d4a8db8c1d07 Mon Sep 17 00:00:00 2001 From: =?utf8?q?=C3=98yvind=20Kol=C3=A5s?= Date: Sun, 20 Nov 2016 14:36:46 +0100 Subject: [PATCH] fast-float: tweak precision so that float->8bit tests pass without issue --- extensions/fast-float.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/extensions/fast-float.c b/extensions/fast-float.c index 3dc713b..162b3f5 100644 --- a/extensions/fast-float.c +++ b/extensions/fast-float.c @@ -154,11 +154,11 @@ babl_lookup_new (BablLookupFunction function, else if (precision <= 0.000040) shift = 10; else if (precision <= 0.000081) shift = 11; else if (precision <= 0.000161) shift = 12; + else if (precision <= 0.000200) shift = 13; else if (precision <= 0.000324) shift = 14; else if (precision <= 0.000649) shift = 15; else shift = 16; /* a bit better than 8bit sRGB quality */ - shift = 16; /* Adjust slightly away from 0.0, saving many entries close to 0, this * causes lookups very close to zero to be passed directly to the @@ -651,8 +651,8 @@ init (void) float a; /* tweaking the precision - does impact speed.. */ - fast_pow = babl_lookup_new (core_lookup, NULL, 0.0, 1.0, 0.0033); - fast_rpow = babl_lookup_new (core_rlookup, NULL, 0.0, 1.0, 0.0033); + fast_pow = babl_lookup_new (core_lookup, NULL, 0.0, 1.0, 0.000199); + fast_rpow = babl_lookup_new (core_rlookup, NULL, 0.0, 1.0, 0.000250); for (f = 0.0; f < 1.0; f+= 0.0000001) { -- 2.30.2